home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.n / wm.n < prev    next >
Text File  |  1995-07-25  |  44KB  |  661 lines

  1.  
  2.  
  3.  
  4.      wwwwmmmm((((nnnn))))                        TTTTkkkk (((( ))))                         wwwwmmmm((((nnnn))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           wm - Communicate with window manager
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           wwwwmmmm _o_p_t_i_o_n _w_i_n_d_o_w ?_a_r_g_s?
  15.      _________________________________________________________________
  16.  
  17.  
  18.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.           The wwwwmmmm command is used to interact with window  managers  in
  20.           order  to control such things as the title for a window, its
  21.           geometry, or the increments in terms  of  which  it  may  be
  22.           resized.   The  wwwwmmmm  command  can  take  any  of  a number of
  23.           different forms, depending on the _o_p_t_i_o_n argument.   All  of
  24.           the  forms  expect at least one additional argument, _w_i_n_d_o_w,
  25.           which must be the path name of a top-level window.
  26.  
  27.           The legal forms for the wwwwmmmm command are:
  28.  
  29.           wwwwmmmm aaaassssppppeeeecccctttt _w_i_n_d_o_w ?_m_i_n_N_u_m_e_r _m_i_n_D_e_n_o_m _m_a_x_N_u_m_e_r _m_a_x_D_e_n_o_m?
  30.                If _m_i_n_N_u_m_e_r, _m_i_n_D_e_n_o_m, _m_a_x_N_u_m_e_r, and _m_a_x_D_e_n_o_m  are  all
  31.                specified,  then  they  will  be  passed  to the window
  32.                manager and the  window  manager  should  use  them  to
  33.                enforce a range of acceptable aspect ratios for _w_i_n_d_o_w.
  34.                The aspect  ratio  of  _w_i_n_d_o_w  (width/length)  will  be
  35.                constrained   to   lie  between  _m_i_n_N_u_m_e_r/_m_i_n_D_e_n_o_m  and
  36.                _m_a_x_N_u_m_e_r/_m_a_x_D_e_n_o_m.  If _m_i_n_N_u_m_e_r etc. are all  specified
  37.                as  empty  strings,  then  any  existing  aspect  ratio
  38.                restrictions  are  removed.   If  _m_i_n_N_u_m_e_r   etc.   are
  39.                specified,  then  the  command returns an empty string.
  40.                Otherwise,  it  returns  a  Tcl  list  containing  four
  41.                elements,  which  are  the  current values of _m_i_n_N_u_m_e_r,
  42.                _m_i_n_D_e_n_o_m,  _m_a_x_N_u_m_e_r,  and  _m_a_x_D_e_n_o_m   (if   no   aspect
  43.                restrictions  are  in  effect,  then an empty string is
  44.                returned).
  45.  
  46.           wwwwmmmm cccclllliiiieeeennnntttt _w_i_n_d_o_w ?_n_a_m_e?
  47.                If _n_a_m_e is specified, this command stores  _n_a_m_e  (which  |
  48.                should be the name of the host on which the application  |
  49.                is executing) in  _w_i_n_d_o_w's  WWWWMMMM____CCCCLLLLIIIIEEEENNNNTTTT____MMMMAAAACCCCHHHHIIIINNNNEEEE  property  |
  50.                for  use by the window manager or session manager.  The  |
  51.                command returns an empty string in this case.  If  _n_a_m_e  |
  52.                isn't  specified, the command returns the last name set  |
  53.                in  a  wwwwmmmm  cccclllliiiieeeennnntttt  command  for  _w_i_n_d_o_w.   If  _n_a_m_e  is  |
  54.                specified  as  an empty string, the command deletes the  |
  55.                WWWWMMMM____CCCCLLLLIIIIEEEENNNNTTTT____MMMMAAAACCCCHHHHIIIINNNNEEEE property from _w_i_n_d_o_w.                  |
  56.  
  57.           wwwwmmmm ccccoooommmmmmmmaaaannnndddd _w_i_n_d_o_w ?_v_a_l_u_e?                                          ||
  58.                If  _v_a_l_u_e  is  specified,  this command stores _v_a_l_u_e in  |
  59.                _w_i_n_d_o_w's WWWWMMMM____CCCCOOOOMMMMMMMMAAAANNNNDDDD property  for  use  by  the  window  |
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/23/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      wwwwmmmm((((nnnn))))                        TTTTkkkk (((( ))))                         wwwwmmmm((((nnnn))))
  71.  
  72.  
  73.  
  74.                manager or session manager and returns an empty string.  |
  75.                _V_a_l_u_e must have proper list  structure;   the  elements  |
  76.                should  contain the words of the command used to invoke  |
  77.                the application.  If _v_a_l_u_e  isn't  specified  then  the  |
  78.                command  returns  the  last  value  set in a wwwwmmmm ccccoooommmmmmmmaaaannnndddd  |
  79.                command for _w_i_n_d_o_w.  If _v_a_l_u_e is specified as an  empty  |
  80.                string,  the  command  deletes  the WWWWMMMM____CCCCOOOOMMMMMMMMAAAANNNNDDDD property  |
  81.                from _w_i_n_d_o_w.
  82.  
  83.           wwwwmmmm ddddeeeeiiiiccccoooonnnniiiiffffyyyy _w_i_n_d_o_w
  84.                Arrange for _w_i_n_d_o_w to  be  displayed  in  normal  (non-
  85.                iconified)  form.   This is done by mapping the window.
  86.                If the window has never been mapped then  this  command
  87.                will  not  map the window, but it will ensure that when
  88.                the window is first mapped it will be displayed in  de-
  89.                iconified form.  Returns an empty string.
  90.  
  91.           wwwwmmmm ffffooooccccuuuussssmmmmooooddddeeeellll _w_i_n_d_o_w ?aaaaccccttttiiiivvvveeee|ppppaaaassssssssiiiivvvveeee?
  92.                If  aaaaccccttttiiiivvvveeee  or  ppppaaaassssssssiiiivvvveeee  is  supplied  as  an  optional
  93.                argument  to  the  command, then it specifies the focus
  94.                model for _w_i_n_d_o_w.  In this case the command returns  an
  95.                empty  string.   If no additional argument is supplied,
  96.                then the command returns the current  focus  model  for
  97.                _w_i_n_d_o_w.   An  aaaaccccttttiiiivvvveeee focus model means that _w_i_n_d_o_w will
  98.                claim the input focus for itself  or  its  descendants,
  99.                even at times when the focus is currently in some other
  100.                application.  PPPPaaaassssssssiiiivvvveeee  means  that  _w_i_n_d_o_w  will  never
  101.                claim  the focus for itself:  the window manager should
  102.                give  the  focus  to  _w_i_n_d_o_w  at   appropriate   times.
  103.                However, once the focus has been given to _w_i_n_d_o_w or one
  104.                of its descendants, the application may  re-assign  the
  105.                focus  among  _w_i_n_d_o_w's  descendants.   The  focus model
  106.                defaults to ppppaaaassssssssiiiivvvveeee, and Tk's ffffooooccccuuuussss command  assumes  a
  107.                passive model of focussing.
  108.  
  109.           wwwwmmmm ffffrrrraaaammmmeeee _w_i_n_d_o_w
  110.                If _w_i_n_d_o_w has been reparented  by  the  window  manager  |
  111.                into  a  decorative  frame,  the  command returns the X  |
  112.                window identifier for the outermost frame that contains  |
  113.                _w_i_n_d_o_w  (the window whose parent is the root or virtual  |
  114.                root).  If _w_i_n_d_o_w hasn't been reparented by the  window  |
  115.                manager   then   the   command  returns  the  X  window  |
  116.                identifier for _w_i_n_d_o_w.
  117.  
  118.           wwwwmmmm ggggeeeeoooommmmeeeettttrrrryyyy _w_i_n_d_o_w ?_n_e_w_G_e_o_m_e_t_r_y?
  119.                If _n_e_w_G_e_o_m_e_t_r_y  is  specified,  then  the  geometry  of
  120.                _w_i_n_d_o_w  is  changed  and  an  empty string is returned.
  121.                Otherwise the current geometry for _w_i_n_d_o_w  is  returned
  122.                (this  is  the most recent geometry specified either by
  123.                manual  resizing  or  in  a   wwwwmmmm   ggggeeeeoooommmmeeeettttrrrryyyy   command).
  124.                _N_e_w_G_e_o_m_e_t_r_y  has  the form ====_w_i_d_t_hxxxx_h_e_i_g_h_t++++_____x++++_____y, where any
  125.                of ====, _w_i_d_t_hxxxx_h_e_i_g_h_t, or ++++_____x++++_____y may be omitted.  _W_i_d_t_h  and
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 7/23/95)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      wwwwmmmm((((nnnn))))                        TTTTkkkk (((( ))))                         wwwwmmmm((((nnnn))))
  137.  
  138.  
  139.  
  140.                _h_e_i_g_h_t  are  positive  integers  specifying the desired
  141.                dimensions  of  _w_i_n_d_o_w.   If  _w_i_n_d_o_w  is  gridded  (see
  142.                GRIDDED  GEOMETRY MANAGEMENT below) then the dimensions
  143.                are  specified  in  grid  units;   otherwise  they  are
  144.                specified  in pixel units.  _X and _y specify the desired
  145.                location of _w_i_n_d_o_w on the screen, in pixels.  If  _x  is
  146.                preceded  by  ++++,  it  specifies  the  number  of pixels
  147.                between the left edge of the screen and the  left  edge
  148.                of  _w_i_n_d_o_w's border;  if preceded by ---- then _x specifies
  149.                the number of pixels between  the  right  edge  of  the
  150.                screen  and the right edge of _w_i_n_d_o_w's border.  If _y is
  151.                preceded by ++++ then it specifies the  number  of  pixels
  152.                between  the  top of the screen and the top of _w_i_n_d_o_w's
  153.                border;  if _y is preceded by ---- then  it  specifies  the
  154.                number  of pixels between the bottom of _w_i_n_d_o_w's border
  155.                and the  bottom  of  the  screen.   If  _n_e_w_G_e_o_m_e_t_r_y  is
  156.                specified  as  an  empty string then any existing user-
  157.                specified geometry for _w_i_n_d_o_w  is  cancelled,  and  the
  158.                window  will revert to the size requested internally by
  159.                its widgets.
  160.  
  161.           wwwwmmmm ggggrrrriiiidddd _w_i_n_d_o_w ?_b_a_s_e_W_i_d_t_h _b_a_s_e_H_e_i_g_h_t _w_i_d_t_h_I_n_c _h_e_i_g_h_t_I_n_c?
  162.                This command indicates that _w_i_n_d_o_w is to be managed  as
  163.                a  gridded  window.  It also specifies the relationship
  164.                between grid units  and  pixel  units.   _B_a_s_e_W_i_d_t_h  and
  165.                _b_a_s_e_H_e_i_g_h_t   specify   the   number   of   grid   units
  166.                corresponding  to  the   pixel   dimensions   requested
  167.                internally    by   _w_i_n_d_o_w   using   TTTTkkkk____GGGGeeeeoooommmmeeeettttrrrryyyyRRRReeeeqqqquuuueeeesssstttt.
  168.                _W_i_d_t_h_I_n_c and _h_e_i_g_h_t_I_n_c specify the number of pixels  in
  169.                each  horizontal  and  vertical  grid unit.  These four
  170.                values  determine  a  range  of  acceptable  sizes  for
  171.                _w_i_n_d_o_w,  corresponding to grid-based widths and heights
  172.                that are non-negative  integers.   Tk  will  pass  this
  173.                information  to  the  window  manager;   during  manual
  174.                resizing, the window manager will restrict the window's
  175.                size  to  one  of these acceptable sizes.  Furthermore,
  176.                during manual resizing the window manager will  display
  177.                the window's current size in terms of grid units rather
  178.                than pixels.  If _b_a_s_e_W_i_d_t_h etc. are  all  specified  as
  179.                empty strings, then _w_i_n_d_o_w will no longer be managed as
  180.                a gridded window.  If _b_a_s_e_W_i_d_t_h etc. are specified then
  181.                the  return  value  is  an empty string.  Otherwise the
  182.                return value is a Tcl  list  containing  four  elements
  183.                corresponding  to  the  current  _b_a_s_e_W_i_d_t_h, _b_a_s_e_H_e_i_g_h_t,
  184.                _w_i_d_t_h_I_n_c, and _h_e_i_g_h_t_I_n_c;  if _w_i_n_d_o_w  is  not  currently
  185.                gridded,  then an empty string is returned.  Note: this
  186.                command should not be  needed  very  often,  since  the
  187.                TTTTkkkk____SSSSeeeettttGGGGrrrriiiidddd  library  procedure  and  the sssseeeettttGGGGrrrriiiidddd option
  188.                provide easier access to the same functionality.
  189.  
  190.           wwwwmmmm ggggrrrroooouuuupppp _w_i_n_d_o_w ?_p_a_t_h_N_a_m_e?
  191.                If _p_a_t_h_N_a_m_e is specified, it gives the  path  name  for
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 7/23/95)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      wwwwmmmm((((nnnn))))                        TTTTkkkk (((( ))))                         wwwwmmmm((((nnnn))))
  203.  
  204.  
  205.  
  206.                the  leader  of a group of related windows.  The window
  207.                manager may use this information, for example, to unmap
  208.                all  of  the windows in a group when the group's leader
  209.                is iconified.  _P_a_t_h_N_a_m_e may be specified  as  an  empty
  210.                string to remove _w_i_n_d_o_w from any group association.  If
  211.                _p_a_t_h_N_a_m_e is specified then the command returns an empty
  212.                string;  otherwise it returns the path name of _w_i_n_d_o_w's
  213.                current group leader, or  an  empty  string  if  _w_i_n_d_o_w
  214.                isn't part of any group.
  215.  
  216.           wwwwmmmm iiiiccccoooonnnnbbbbiiiittttmmmmaaaapppp _w_i_n_d_o_w ?_b_i_t_m_a_p?
  217.                If _b_i_t_m_a_p is specified, then it names a bitmap  in  the
  218.                standard  forms  accepted  by  Tk (see the TTTTkkkk____GGGGeeeettttBBBBiiiittttmmmmaaaapppp
  219.                manual entry for details).  This bitmap  is  passed  to
  220.                the  window  manager  to be displayed in _w_i_n_d_o_w's icon,
  221.                and the command returns an empty string.  If  an  empty
  222.                string  is  specified for _b_i_t_m_a_p, then any current icon
  223.                bitmap is cancelled for _w_i_n_d_o_w.  If _b_i_t_m_a_p is specified
  224.                then the command returns an empty string.  Otherwise it
  225.                returns the name of the current icon bitmap  associated
  226.                with  _w_i_n_d_o_w,  or an empty string if _w_i_n_d_o_w has no icon
  227.                bitmap.
  228.  
  229.           wwwwmmmm iiiiccccoooonnnniiiiffffyyyy _w_i_n_d_o_w
  230.                Arrange for _w_i_n_d_o_w to be iconified.  It  _w_i_n_d_o_w  hasn't
  231.                yet  been  mapped for the first time, this command will
  232.                arrange for it to appear in the iconified state when it
  233.                is eventually mapped.
  234.  
  235.           wwwwmmmm iiiiccccoooonnnnmmmmaaaasssskkkk _w_i_n_d_o_w ?_b_i_t_m_a_p?
  236.                If _b_i_t_m_a_p is specified, then it names a bitmap  in  the
  237.                standard  forms  accepted  by  Tk (see the TTTTkkkk____GGGGeeeettttBBBBiiiittttmmmmaaaapppp
  238.                manual entry for details).  This bitmap  is  passed  to
  239.                the  window manager to be used as a mask in conjunction
  240.                with the iiiiccccoooonnnnbbbbiiiittttmmmmaaaapppp option:  where the mask has  zeroes
  241.                no icon will be displayed;  where it has ones, the bits
  242.                from the icon bitmap will be displayed.   If  an  empty
  243.                string  is  specified  for _b_i_t_m_a_p then any current icon
  244.                mask is cancelled for _w_i_n_d_o_w  (this  is  equivalent  to
  245.                specifying  a  bitmap  of  all  ones).   If  _b_i_t_m_a_p  is
  246.                specified then the command  returns  an  empty  string.
  247.                Otherwise  it returns the name of the current icon mask
  248.                associated with _w_i_n_d_o_w, or an empty string if  no  mask
  249.                is in effect.
  250.  
  251.           wwwwmmmm iiiiccccoooonnnnnnnnaaaammmmeeee _w_i_n_d_o_w ?_n_e_w_N_a_m_e?
  252.                If _n_e_w_N_a_m_e is specified,  then  it  is  passed  to  the
  253.                window  manager;   the  window  manager  should display
  254.                _n_e_w_N_a_m_e inside the icon  associated  with  _w_i_n_d_o_w.   In
  255.                this  case  an  empty string is returned as result.  If
  256.                _n_e_w_N_a_m_e isn't specified then the  command  returns  the
  257.                current  icon name for _w_i_n_d_o_w, or an empty string if no
  258.  
  259.  
  260.  
  261.      Page 4                                          (printed 7/23/95)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      wwwwmmmm((((nnnn))))                        TTTTkkkk (((( ))))                         wwwwmmmm((((nnnn))))
  269.  
  270.  
  271.  
  272.                icon name has been specified (in this case  the  window
  273.                manager  will  normally  display the window's title, as
  274.                specified with the wwwwmmmm ttttiiiittttlllleeee command).
  275.  
  276.           wwwwmmmm iiiiccccoooonnnnppppoooossssiiiittttiiiioooonnnn _w_i_n_d_o_w ?_x _y?
  277.                If _x and _y are specified, they are passed to the window
  278.                manager  as a hint about where to position the icon for
  279.                _w_i_n_d_o_w.  In this case an empty string is returned.   If
  280.                _x  and  _y  are  specified  as  empty  strings  then any
  281.                existing icon position hint is cancelled.  If neither _x
  282.                nor _y is specified, then the command returns a Tcl list
  283.                containing two  values,  which  are  the  current  icon
  284.                position hints (if no hints are in effect then an empty
  285.                string is returned).
  286.  
  287.           wwwwmmmm iiiiccccoooonnnnwwwwiiiinnnnddddoooowwww _w_i_n_d_o_w ?_p_a_t_h_N_a_m_e?
  288.                If _p_a_t_h_N_a_m_e is specified, it is the  path  name  for  a
  289.                window  to  use  as  icon  for  _w_i_n_d_o_w:  when _w_i_n_d_o_w is
  290.                iconified then _p_a_t_h_N_a_m_e should be mapped  to  serve  as
  291.                icon,  and  when  _w_i_n_d_o_w  is de-iconified then _p_a_t_h_N_a_m_e
  292.                will be unmapped again.  If _p_a_t_h_N_a_m_e is specified as an
  293.                empty  string then any existing icon window association
  294.                for _w_i_n_d_o_w will be cancelled.  If the _p_a_t_h_N_a_m_e argument
  295.                is   specified   then  an  empty  string  is  returned.
  296.                Otherwise the command returns  the  path  name  of  the
  297.                current  icon  window for _w_i_n_d_o_w, or an empty string if
  298.                there is no icon window currently specified for _w_i_n_d_o_w.
  299.                Note:  not all window managers support the notion of an
  300.                icon window.
  301.  
  302.           wwwwmmmm mmmmaaaaxxxxssssiiiizzzzeeee _w_i_n_d_o_w ?_w_i_d_t_h _h_e_i_g_h_t?
  303.                If _w_i_d_t_h and _h_e_i_g_h_t are specified, then _w_i_n_d_o_w  becomes
  304.                resizable   and  _w_i_d_t_h  and  _h_e_i_g_h_t  give  its  maximum
  305.                permissible  dimensions.   For  gridded   windows   the
  306.                dimensions are specified in grid units;  otherwise they
  307.                are specified in pixel units.   During  manual  sizing,
  308.                the   window   manager  should  restrict  the  window's
  309.                dimensions to be  less  than  or  equal  to  _w_i_d_t_h  and
  310.                _h_e_i_g_h_t.   If  _w_i_d_t_h  and  _h_e_i_g_h_t are specified as empty
  311.                strings, then the maximum size option is cancelled  for
  312.                _w_i_n_d_o_w.   If  _w_i_d_t_h  and _h_e_i_g_h_t are specified, then the
  313.                command returns an empty string.  Otherwise it  returns
  314.                a  Tcl  list  with  two elements, which are the maximum
  315.                width and height currently in effect;   if  no  maximum
  316.                dimensions  are  in  effect  for  _w_i_n_d_o_w  then an empty
  317.                string is  returned.   See  the  sections  on  geometry
  318.                management below for more information.
  319.  
  320.           wwwwmmmm mmmmiiiinnnnssssiiiizzzzeeee _w_i_n_d_o_w ?_w_i_d_t_h _h_e_i_g_h_t?
  321.                If _w_i_d_t_h and _h_e_i_g_h_t are specified, then _w_i_n_d_o_w  becomes
  322.                resizable   and  _w_i_d_t_h  and  _h_e_i_g_h_t  give  its  minimum
  323.                permissible  dimensions.   For  gridded   windows   the
  324.  
  325.  
  326.  
  327.      Page 5                                          (printed 7/23/95)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      wwwwmmmm((((nnnn))))                        TTTTkkkk (((( ))))                         wwwwmmmm((((nnnn))))
  335.  
  336.  
  337.  
  338.                dimensions are specified in grid units;  otherwise they
  339.                are specified in pixel units.   During  manual  sizing,
  340.                the   window   manager  should  restrict  the  window's
  341.                dimensions to be greater than or  equal  to  _w_i_d_t_h  and
  342.                _h_e_i_g_h_t.   If  _w_i_d_t_h  and  _h_e_i_g_h_t are specified as empty
  343.                strings, then the minimum size option is cancelled  for
  344.                _w_i_n_d_o_w.   If  _w_i_d_t_h  and _h_e_i_g_h_t are specified, then the
  345.                command returns an empty string.  Otherwise it  returns
  346.                a  Tcl  list  with  two elements, which are the minimum
  347.                width and height currently in effect;   if  no  minimum
  348.                dimensions  are  in  effect  for  _w_i_n_d_o_w  then an empty
  349.                string is  returned.   See  the  sections  on  geometry
  350.                management below for more information.
  351.  
  352.           wwwwmmmm oooovvvveeeerrrrrrrriiiiddddeeeerrrreeeeddddiiiirrrreeeecccctttt _w_i_n_d_o_w ?_b_o_o_l_e_a_n?
  353.                If _b_o_o_l_e_a_n is specified, it must have a proper  boolean  |
  354.                form  and  the override-redirect flag for _w_i_n_d_o_w is set  |
  355.                to that value.  If _b_o_o_l_e_a_n is not specified then 1111 or 0000  |
  356.                is  returned  to  indicate whether or not the override-  |
  357.                redirect flag is currently set for _w_i_n_d_o_w.  Setting the  |
  358.                override-redirect  flag  for  a  window causes it to be  |
  359.                ignored by the window  manager;   among  other  things,  |
  360.                this  means that the window will not be reparented from  |
  361.                the root window into a decorative frame  and  the  user  |
  362.                will  not  be  able  to manipulate the window using the  |
  363.                normal window manager mechanisms.
  364.  
  365.           wwwwmmmm ppppoooossssiiiittttiiiioooonnnnffffrrrroooommmm _w_i_n_d_o_w ?_w_h_o?
  366.                If _w_h_o is specified, it must be either pppprrrrooooggggrrrraaaammmm or uuuusssseeeerrrr,
  367.                or  an  abbreviation of one of these two.  It indicates
  368.                whether _w_i_n_d_o_w's current position was requested by  the
  369.                program  or  by  the user.  Many window managers ignore
  370.                program-requested initial positions and ask the user to
  371.                manually  position  the  window;   if uuuusssseeeerrrr is specified
  372.                then the window manager should position the  window  at
  373.                the given place without asking the user for assistance.
  374.                If _w_h_o is  specified  as  an  empty  string,  then  the
  375.                current  position  source  is  cancelled.   If  _w_h_o  is
  376.                specified, then the command returns  an  empty  string.
  377.                Otherwise  it  returns  uuuusssseeeerrrr  or wwwwiiiinnnnddddoooowwww to indicate the
  378.                source of the window's current position,  or  an  empty
  379.                string  if  no  source  has  been  specified yet.  Most
  380.                window managers interpret ``no source''  as  equivalent
  381.                to  pppprrrrooooggggrrrraaaammmm.   Tk  will  automatically set the position  |
  382.                source to uuuusssseeeerrrr when a wwwwmmmm ggggeeeeoooommmmeeeettttrrrryyyy command  is  invoked,  |
  383.                unless the source has been set explicitly to pppprrrrooooggggrrrraaaammmm.    |
  384.  
  385.           wwwwmmmm pppprrrroooottttooooccccoooollll _w_i_n_d_o_w ?_n_a_m_e? ?_c_o_m_m_a_n_d?                                ||
  386.                This command is used to manage window manager protocols  |
  387.                such as WWWWMMMM____DDDDEEEELLLLEEEETTTTEEEE____WWWWIIIINNNNDDDDOOOOWWWW.  _N_a_m_e is the name of an  atom  |
  388.                corresponding  to  a  window  manager protocol, such as  |
  389.                WWWWMMMM____DDDDEEEELLLLEEEETTTTEEEE____WWWWIIIINNNNDDDDOOOOWWWW or WWWWMMMM____SSSSAAAAVVVVEEEE____YYYYOOOOUUUURRRRSSSSEEEELLLLFFFF or  WWWWMMMM____TTTTAAAAKKKKEEEE____FFFFOOOOCCCCUUUUSSSS.  |
  390.  
  391.  
  392.  
  393.      Page 6                                          (printed 7/23/95)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      wwwwmmmm((((nnnn))))                        TTTTkkkk (((( ))))                         wwwwmmmm((((nnnn))))
  401.  
  402.  
  403.  
  404.                If both _n_a_m_e and _c_o_m_m_a_n_d are specified, then _c_o_m_m_a_n_d is  |
  405.                associated with the protocol specified by  _n_a_m_e.   _N_a_m_e  |
  406.                will be added to _w_i_n_d_o_w's WWWWMMMM____PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLLSSSS property to tell  |
  407.                the window manager that the application has a  protocol  |
  408.                handler  for  _n_a_m_e,  and _c_o_m_m_a_n_d will be invoked in the  |
  409.                future whenever the window manager sends a  message  to  |
  410.                the client for that protocol.  In this case the command  |
  411.                returns an empty string.   If  _n_a_m_e  is  specified  but  |
  412.                _c_o_m_m_a_n_d  isn't,  then  the  current command for _n_a_m_e is  |
  413.                returned, or an empty string if  there  is  no  handler  |
  414.                defined  for _n_a_m_e.  If _c_o_m_m_a_n_d is specified as an empty  |
  415.                string then the current handler for _n_a_m_e is deleted and  |
  416.                it is removed from the WWWWMMMM____PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLLSSSS property on _w_i_n_d_o_w;  |
  417.                an empty string is returned.  Lastly, if  neither  _n_a_m_e  |
  418.                nor _c_o_m_m_a_n_d is specified, the command returns a list of  |
  419.                all the protocols  for  which  handlers  are  currently  |
  420.                defined for _w_i_n_d_o_w.                                      |
  421.  
  422.                Tk   always   defines   a    protocol    handler    for  |
  423.                WWWWMMMM____DDDDEEEELLLLEEEETTTTEEEE____WWWWIIIINNNNDDDDOOOOWWWW,  even  if  you  haven't asked for one  |
  424.                with  wwwwmmmm  pppprrrroooottttooooccccoooollll.   If  a  WWWWMMMM____DDDDEEEELLLLEEEETTTTEEEE____WWWWIIIINNNNDDDDOOOOWWWW   message  |
  425.                arrives  when  you  haven't  defined a handler, then Tk  |
  426.                handles the message by destroying the window for  which  |
  427.                it was received.                                         |
  428.  
  429.           wwwwmmmm ssssiiiizzzzeeeeffffrrrroooommmm _w_i_n_d_o_w ?_w_h_o?
  430.                If _w_h_o is specified, it must be either pppprrrrooooggggrrrraaaammmm or uuuusssseeeerrrr,
  431.                or  an  abbreviation of one of these two.  It indicates
  432.                whether _w_i_n_d_o_w's current  size  was  requested  by  the
  433.                program  or  by  the user.  Some window managers ignore
  434.                program-requested sizes and ask the  user  to  manually
  435.                size  the window;  if uuuusssseeeerrrr is specified then the window
  436.                manager should  give  the  window  its  specified  size
  437.                without  asking  the  user  for  assistance.  If _w_h_o is
  438.                specified as an empty string,  then  the  current  size
  439.                source  is  cancelled.   If  _w_h_o is specified, then the
  440.                command returns an empty string.  Otherwise it  returns
  441.                uuuusssseeeerrrr  or  wwwwiiiinnnnddddoooowwww to indicate the source of the window's
  442.                current size, or an empty string if no source has  been
  443.                specified  yet.   Most  window  managers interpret ``no
  444.                source'' as equivalent to pppprrrrooooggggrrrraaaammmm.
  445.  
  446.           wwwwmmmm ssssttttaaaatttteeee _w_i_n_d_o_w
  447.                Returns the current state of  _w_i_n_d_o_w:   either  nnnnoooorrrrmmmmaaaallll,  |
  448.                iiiiccccoooonnnniiiicccc, or wwwwiiiitttthhhhddddrrrraaaawwwwnnnn.
  449.  
  450.           wwwwmmmm ttttiiiittttlllleeee _w_i_n_d_o_w ?_s_t_r_i_n_g?
  451.                If _s_t_r_i_n_g is specified, then it will be passed  to  the
  452.                window  manager  for  use  as the title for _w_i_n_d_o_w (the
  453.                window manager should display this string  in  _w_i_n_d_o_w's
  454.                title  bar).  In this case the command returns an empty
  455.                string.  If _s_t_r_i_n_g isn't  specified  then  the  command
  456.  
  457.  
  458.  
  459.      Page 7                                          (printed 7/23/95)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      wwwwmmmm((((nnnn))))                        TTTTkkkk (((( ))))                         wwwwmmmm((((nnnn))))
  467.  
  468.  
  469.  
  470.                returns  the  current  title for the _w_i_n_d_o_w.  The title
  471.                for a window defaults to its name.
  472.  
  473.           wwwwmmmm ttttrrrraaaannnnssssiiiieeeennnntttt _w_i_n_d_o_w ?_m_a_s_t_e_r?
  474.                If _m_a_s_t_e_r is specified,  then  the  window  manager  is
  475.                informed  that _w_i_n_d_o_w is a transient window (e.g. pull-
  476.                down menu) working on behalf of _m_a_s_t_e_r (where _m_a_s_t_e_r is
  477.                the  path  name  for  a top-level window).  Some window
  478.                managers will use this  information  to  manage  _w_i_n_d_o_w
  479.                specially.   If  _m_a_s_t_e_r is specified as an empty string
  480.                then _w_i_n_d_o_w is marked as not being a  transient  window
  481.                any  more.   If  _m_a_s_t_e_r  is specified, then the command
  482.                returns an empty string.  Otherwise the command returns
  483.                the  path  name of _w_i_n_d_o_w's current master, or an empty
  484.                string if _w_i_n_d_o_w isn't currently a transient window.
  485.  
  486.           wwwwmmmm wwwwiiiitttthhhhddddrrrraaaawwww _w_i_n_d_o_w
  487.                Arranges for _w_i_n_d_o_w to be withdrawn  from  the  screen.
  488.                This  causes  the  window  to be unmapped and forgotten
  489.                about by the window manager.  If the window  has  never  |
  490.                been  mapped, then this command causes the window to be  |
  491.                mapped in the withdrawn state.  Not all window managers  |
  492.                appear to know how to handle windows that are mapped in  |
  493.                the withdrawn state.  Note: it sometimes  seems  to  be
  494.                necessary to withdraw a window and then re-map it (e.g.
  495.                with wwwwmmmm ddddeeeeiiiiccccoooonnnniiiiffffyyyy) to get some window managers  to  pay
  496.                attention  to  changes  in  window  attributes  such as
  497.                group.
  498.  
  499.  
  500.      SSSSOOOOUUUURRRRCCCCEEEESSSS OOOOFFFF GGGGEEEEOOOOMMMMEEEETTTTRRRRYYYY IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
  501.           Size-related information for top-level windows can come from
  502.           three  sources.   First,  geometry  requests  come  from the
  503.           widgets that are descendants of a  top-level  window.   Each
  504.           widget  requests  a  particular  size  for itself by calling
  505.           TTTTkkkk____GGGGeeeeoooommmmeeeettttrrrryyyyRRRReeeeqqqquuuueeeesssstttt.  This information is passed to  geometry
  506.           managers,  which  then request large enough sizes for parent
  507.           windows so that  they  can  layout  the  children  properly.
  508.           Geometry  information  passes  upwards  through  the  window
  509.           hierarchy until eventually a particular  size  is  requested
  510.           for  each  top-level  window.   These  requests  are  called
  511.           _i_n_t_e_r_n_a_l _r_e_q_u_e_s_t_s  in  the  discussion  below.   The  second
  512.           source  of  width  and  height information is through the wwwwmmmm
  513.           ggggeeeeoooommmmeeeettttrrrryyyy command.  Third, the user can request a  particular
  514.           size  for  a  window using the interactive facilities of the
  515.           window manager.  The second  and  third  types  of  geometry
  516.           requests  are  called  _e_x_t_e_r_n_a_l  _r_e_q_u_e_s_t_s  in the discussion
  517.           below;  Tk treats these two kinds of requests identically.
  518.  
  519.  
  520.      UUUUNNNNGGGGRRRRIIIIDDDDDDDDEEEEDDDD GGGGEEEEOOOOMMMMEEEETTTTRRRRYYYY MMMMAAAANNNNAAAAGGGGEEEEMMMMEEEENNNNTTTT
  521.           Tk allows the geometry of a top-level window to  be  managed
  522.  
  523.  
  524.  
  525.      Page 8                                          (printed 7/23/95)
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      wwwwmmmm((((nnnn))))                        TTTTkkkk (((( ))))                         wwwwmmmm((((nnnn))))
  533.  
  534.  
  535.  
  536.           in  either  of  two general ways: ungridded or gridded.  The
  537.           ungridded form occurs if no wwwwmmmm ggggrrrriiiidddd command has been  issued
  538.           for  a  top-level  window.  Ungridded management has several
  539.           variants.  In the simplest variant of ungridded windows,  no
  540.           wwwwmmmm  ggggeeeeoooommmmeeeettttrrrryyyy,  wwwwmmmm  mmmmiiiinnnnssssiiiizzzzeeee, or wwwwmmmm mmmmaaaaxxxxssssiiiizzzzeeee commands have been
  541.           invoked  either.   In  this  case,  the  window's  size   is
  542.           determined  totally  by the internal requests emanating from
  543.           the widgets inside the  window:   Tk  will  ask  the  window
  544.           manager  not  to  permit  the  user  to  resize  the  window
  545.           interactively.
  546.  
  547.           If a wwwwmmmm ggggeeeeoooommmmeeeettttrrrryyyy command is invoked on an ungridded  window,
  548.           then  the  size in that command overrides any size requested
  549.           by the window's widgets;  from now  on,  the  window's  size
  550.           will  be  determined entirely by the most recent information
  551.           from wwwwmmmm ggggeeeeoooommmmeeeettttrrrryyyy commands.  To go back  to  using  the  size
  552.           requested  by  the  window's  widgets,  issue  a wwwwmmmm ggggeeeeoooommmmeeeettttrrrryyyy
  553.           command with an empty _g_e_o_m_e_t_r_y string.
  554.  
  555.           To enable interactive resizing of an ungridded  window,  one
  556.           or  both  of  the wwwwmmmm mmmmaaaaxxxxssssiiiizzzzeeee and wwwwmmmm mmmmiiiinnnnssssiiiizzzzeeee commands must be
  557.           issued.  The information from these commands will be  passed
  558.           to the window manager, and size changes within the specified
  559.           range will be permitted.  For ungridded windows  the  limits
  560.           refer  to  the  top-level window's dimensions in pixels.  If
  561.           only a  wwwwmmmm  mmmmaaaaxxxxssssiiiizzzzeeee  command  is  issued  then  the  minimum
  562.           dimensions  default  to  1;  if only a wwwwmmmm mmmmiiiinnnnssssiiiizzzzeeee command is  |
  563.           issued then the maximum dimensions default to  the  size  of  |
  564.           the   display.    If   the  size  of  a  window  is  changed
  565.           interactively, it has the same effect as if wwwwmmmm ggggeeeeoooommmmeeeettttrrrryyyy  had
  566.           been  invoked:  from now on, internal geometry requests will
  567.           be ignored.  To return to internal control over the window's
  568.           size,  issue  a  wwwwmmmm  ggggeeeeoooommmmeeeettttrrrryyyy command with an empty _g_e_o_m_e_t_r_y
  569.           argument.  If a window has been manually resized  or  moved,
  570.           the  wwwwmmmm  ggggeeeeoooommmmeeeettttrrrryyyy  command will return the geometry that was
  571.           requested interactively.
  572.  
  573.  
  574.      GGGGRRRRIIIIDDDDDDDDEEEEDDDD GGGGEEEEOOOOMMMMEEEETTTTRRRRYYYY MMMMAAAANNNNAAAAGGGGEEEEMMMMEEEENNNNTTTT
  575.           The second style of geometry management is  called  _g_r_i_d_d_e_d.
  576.           This   approach  occurs  when  one  of  the  widgets  of  an
  577.           application supports a range of useful sizes.  This  occurs,
  578.           for  example,  in a text editor where the scrollbars, menus,
  579.           and other adornments are fixed in size but the  edit  widget
  580.           can  support  any  number of lines of text or characters per
  581.           line.  In this case, it is usually desirable to let the user
  582.           specify  the  number of lines or characters-per-line, either
  583.           with the wwwwmmmm ggggeeeeoooommmmeeeettttrrrryyyy command or  by  interactively  resizing
  584.           the  window.   In the case of text, and in other interesting
  585.           cases also, only discrete sizes of the  window  make  sense,
  586.           such  as  integral numbers of lines and characters-per-line;
  587.           arbitrary pixel sizes are not useful.
  588.  
  589.  
  590.  
  591.      Page 9                                          (printed 7/23/95)
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.      wwwwmmmm((((nnnn))))                        TTTTkkkk (((( ))))                         wwwwmmmm((((nnnn))))
  599.  
  600.  
  601.  
  602.           Gridded geometry management provides support for  this  kind
  603.           of  application.   Tk  (and  the window manager) assume that
  604.           there is a grid of some sort within the application and that
  605.           the  application  should  be  resized in terms of _g_r_i_d _u_n_i_t_s
  606.           rather  than  pixels.   Gridded   geometry   management   is
  607.           typically  invoked  by  turning  on the sssseeeettttGGGGrrrriiiidddd option for a
  608.           widget;  it can also be invoked with the wwwwmmmm ggggrrrriiiidddd command  or
  609.           by  calling  TTTTkkkk____SSSSeeeettttGGGGrrrriiiidddd.   In  each  of these approaches the
  610.           particular widget (or sometimes code in the application as a
  611.           whole)  specifies  the  relationship  between  integral grid
  612.           sizes for the window and pixel sizes.   To  return  to  non-
  613.           gridded  geometry  management,  invoke  wwwwmmmm  ggggrrrriiiidddd  with empty
  614.           argument strings.
  615.  
  616.           When gridded geometry management is  enabled  then  all  the
  617.           dimensions  specified  in  wwwwmmmm  mmmmiiiinnnnssssiiiizzzzeeee,  wwwwmmmm  mmmmaaaaxxxxssssiiiizzzzeeee, and wwwwmmmm
  618.           ggggeeeeoooommmmeeeettttrrrryyyy commands are treated  as  grid  units  rather  than
  619.           pixel units.  Interactive resizing is automatically enabled,
  620.           and it will be carried out in even  numbers  of  grid  units
  621.           rather  than  pixels.  By default there are no limits on the
  622.           minimum or maximum dimensions of a gridded window.  As  with
  623.           ungridded windows, interactive resizing has exactly the same
  624.           effect as invoking the wwwwmmmm  ggggeeeeoooommmmeeeettttrrrryyyy  command.   For  gridded
  625.           windows,  internally-  and  externally-requested  dimensions
  626.           work together: the  externally-specified  width  and  height
  627.           determine  the  size  of  the  window in grid units, and the
  628.           information from the last wwwwmmmm ggggrrrriiiidddd  command  maps  from  grid
  629.           units to pixel units.
  630.  
  631.  
  632.      BBBBUUUUGGGGSSSS
  633.           The  window  manager  interactions  seem  too   complicated,
  634.           especially  for  managing  geometry.   Suggestions on how to
  635.           simplify this would be greatly appreciated.
  636.  
  637.           Most existing window  managers  appear  to  have  bugs  that
  638.           affect  the  operation of the wwwwmmmm command.  For example, some
  639.           changes won't take effect if the window is  already  active:
  640.           the  window  will  have  to be withdrawn and de-iconified in
  641.           order to make the change happen.
  642.  
  643.  
  644.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  645.           aspect ratio, deiconify, focus model, geometry, grid, group,
  646.           icon,  iconify, increments, position, size, title, top-level
  647.           window, units, window manager
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.      Page 10                                         (printed 7/23/95)
  658.  
  659.  
  660.  
  661.